package com.tsystems.skilltest;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author aesipov
 */
public class PropertiesUtils
{
    public static Properties getProperties(String name)
    {
        try
        {
            Properties properties = new Properties();
            InputStream propertyStream = PropertiesUtils.class.getResourceAsStream("/" + name);
            properties.load(propertyStream);
            return properties;
        }
        catch (IOException e)
        {
            throw new IllegalArgumentException("Can't read property file", e);
        }
    }
}
